package com.project.role;

import javax.swing.*;
import java.awt.*;

/**
 * 地图类
 */
public class GameMap {

    /**
     * 地图图片
     */
    public  static Image mapImage = new ImageIcon("image/map.jpg").getImage();
    /**
     * 地图X坐标
     */
    private int mapX;

    /**
     * 绘制地图
     * @param memoryGraphics
     */
    public void drawMySelf(Graphics memoryGraphics) {
        if (mapX > -17000) {
            mapX -= 5;
        }
        memoryGraphics.drawImage(mapImage, mapX, 0, null);
    }


}
